#!/bin/bash

# 更新包索引
sudo apt-get update

# 定义要安装的包列表
packages=(
    "swig"
	"python3-dev"
	"libssl-dev"
	"libgnutls28-dev"
)

# 检查并安装每个包
for pkg in "${packages[@]}"; do
    if dpkg -s "$pkg" >/dev/null 2>&1; then
        echo "包 '$pkg' 已安装，跳过..."
    else
        echo "安装包 '$pkg'..."
        sudo apt-get install -y "$pkg"
    fi
done